summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorCaptain Throwback <captainthrowback@gmail.com>2018-07-27 16:05:24 +0200
committerCaptain Throwback <captainthrowback@hotmail.com>2018-08-24 18:47:45 +0200
commit9d6feb53115e2dcc49a644400da4d62a16c1c3c6 (patch)
treec5d5778cd617d8d60231cebf87f16527a7f47313 /gui
parentMerge AOSP android-9.0.0_r3 (diff)
downloadandroid_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.gz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.bz2
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.lz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.xz
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.tar.zst
android_bootable_recovery-9d6feb53115e2dcc49a644400da4d62a16c1c3c6.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/action.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index fb05d77b4..d708dd467 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1819,14 +1819,14 @@ int GUIAction::checkpartitionlifetimewrites(std::string arg)
int GUIAction::mountsystemtoggle(std::string arg)
{
int op_status = 0;
- bool remount_system = PartitionManager.Is_Mounted_By_Path("/system");
+ bool remount_system = PartitionManager.Is_Mounted_By_Path(PartitionManager.Get_Android_Root_Path());
bool remount_vendor = PartitionManager.Is_Mounted_By_Path("/vendor");
operation_start("Toggle System Mount");
- if (!PartitionManager.UnMount_By_Path("/system", true)) {
+ if (!PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
op_status = 1; // fail
} else {
- TWPartition* Part = PartitionManager.Find_Partition_By_Path("/system");
+ TWPartition* Part = PartitionManager.Find_Partition_By_Path(PartitionManager.Get_Android_Root_Path());
if (Part) {
if (arg == "0") {
DataManager::SetValue("tw_mount_system_ro", 0);
@@ -1910,9 +1910,9 @@ int GUIAction::checkforapp(std::string arg __unused)
DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed or do not install
goto exit;
}
- if (PartitionManager.Mount_By_Path("/system", false)) {
- string base_path = "/system";
- if (TWFunc::Path_Exists("/system/system"))
+ if (PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), false)) {
+ string base_path = PartitionManager.Get_Android_Root_Path();
+ if (TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system"))
base_path += "/system"; // For devices with system as a root file system (e.g. Pixel)
string install_path = base_path + "/priv-app";
if (!TWFunc::Path_Exists(install_path))
@@ -2007,9 +2007,9 @@ int GUIAction::installapp(std::string arg __unused)
sync();
}
} else {
- if (PartitionManager.Mount_By_Path("/system", true)) {
- string base_path = "/system";
- if (TWFunc::Path_Exists("/system/system"))
+ if (PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
+ string base_path = PartitionManager.Get_Android_Root_Path();
+ if (TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system"))
base_path += "/system"; // For devices with system as a root file system (e.g. Pixel)
string install_path = base_path + "/priv-app";
string context = "u:object_r:system_file:s0";
@@ -2034,7 +2034,7 @@ int GUIAction::installapp(std::string arg __unused)
}
sync();
sync();
- PartitionManager.UnMount_By_Path("/system", true);
+ PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true);
op_status = 0;
} else {
LOGERR("Error making app directory '%s': %s\n", strerror(errno));